package comgame.components;

import com.almasb.fxgl.entity.component.Component;
import comgame.entities.Farmland;

public class FarmlandComponent extends Component {
    private Farmland farmland;

    public FarmlandComponent(Farmland farmland) {
        this.farmland = farmland;
    }

    public Farmland getFarmland() {
        return farmland;
    }

    public boolean isAvailableForPlant() {
        return farmland != null && farmland.isTilled() && !farmland.hasCrop();
    }
}
